//
//  OMGNewTableViewCell.m
//  A_project2.0
//
//  Created by dllo on 16/3/15.
//  Copyright © 2016年 七平. All rights reserved.
//

#import "OMGNewTableViewCell.h"

#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height

@implementation OMGNewTableViewCell

#pragma mark - 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] init];
        [self.contentView addSubview:_img];
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_titleLabel];
        
        self.xiangqingLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_xiangqingLabel];
        
    }
    return self;
}

#pragma mark - cell布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(10, 10, WIDTH / 3 - 55, 70);
    _img.layer.cornerRadius = 35;
    _img.clipsToBounds = YES;
    _titleLabel.frame = CGRectMake(WIDTH / 3 - 35, 10, WIDTH / 3 , 30);
    _titleLabel.font = [UIFont systemFontOfSize:15];
    _xiangqingLabel.frame = CGRectMake(WIDTH / 3 - 35, 35, WIDTH / 3 * 2 + 30, 60);
    _xiangqingLabel.font = [UIFont systemFontOfSize:14];
    _xiangqingLabel.numberOfLines = 0;
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
